#pragma once
#include <YSimpleSystem/IStream.h>

namespace ysimple_system
{
	class YStream :
		public IStream
	{
		char	m_buffer[1024*4];
		size_t	m_writerIndex;
		size_t	m_readerIndex;
	public:
		YStream(void);
		virtual ~YStream(void);

		void	write(const void* data, size_t len) override;
		void	read(void* data, size_t len) override;
		char*	getBuffer() override;
		size_t	len() override;
		void	release() override;
	};
}


